home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / vsc92nov.zip / equiv-prim.c < prev    next >
Text File  |  1992-11-02  |  913b  |  41 lines

  1. /*
  2.  * equiv-prim.c -- Implementation of Scheme's primitive equivalence predicates
  3.  *
  4.  * (C) m.b (Matthias Blume), Mon May 18 17:01:52 MET DST 1992, HUB/Ger
  5.  *         Humboldt-University of Berlin, Germany
  6.  */
  7.  
  8. # ident "@(#)equiv-prim.c    (C) M.Blume, Humboldt-Uni Berlin, 1.2"
  9.  
  10. # include "Cont.h"
  11. # include "Boolean.h"
  12. # include "storext.h"
  13.  
  14. # include "builtins.tab"
  15.  
  16. void ScmPrimitiveEqvP (unsigned short argcnt)
  17. {
  18.   void *tmp1, *tmp2;
  19.   tmp1 = ScmPop ();
  20.   tmp2 = ScmPeek ();
  21.   tmp1 = eqv_object (tmp1, tmp2) ? &ScmTrue : &ScmFalse;
  22.   ScmSetTop (tmp1);
  23. }
  24.  
  25. void ScmPrimitiveEqualP (unsigned short argcnt)
  26. {
  27.   void *tmp1, *tmp2;
  28.   tmp1 = ScmPop ();
  29.   tmp2 = ScmPeek ();
  30.   tmp1 = equal_object (tmp1, tmp2) ? &ScmTrue : &ScmFalse;
  31.   ScmSetTop (tmp1);
  32. }
  33.  
  34. void ScmPrimitiveEqP (unsigned short argcnt)
  35. {
  36.   void *tmp1, *tmp2;
  37.   tmp1 = ScmPop ();
  38.   tmp2 = ScmPeek ();
  39.   ScmSetTop (tmp1 == tmp2 ? &ScmTrue : &ScmFalse);
  40. }
  41.